#ifndef __MARS_PIPELINE_FBX_MGR_H__
#define __MARS_PIPELINE_FBX_MGR_H__

#include "MarsMeshImportMgr.h"
#include "MarsFbxMeshImporter.h"

#include <fbxsdk.h>

namespace Pipeline
{

class FbxMgr : public MeshImportMgr
{
public:
									~FbxMgr();

	bool							Initialize();
	void							PostInit();
	void							Shutdown();

	static FbxMgr&					Instance();
	static void						Destroy();
	
	virtual MeshImporter&			GetMeshImporter();
	virtual MeshImportType			GetMeshImportType() const;

	FbxManager*						GetFbxManager();
	FbxScene*						GetFbxScene();

private:
									FbxMgr();
									FbxMgr( const FbxMgr& );
	FbxMgr&							operator = ( const FbxMgr& );

	static FbxMgr*					ms_pFbxMgr;

	FbxManager*						m_pFbxManager;
	FbxScene*						m_pFbxScene;

	FbxMeshImporter					m_meshImporter;
};

inline FbxMgr& FbxMgr::Instance()
{
	if ( !ms_pFbxMgr )
	{
		ms_pFbxMgr = new FbxMgr();
	}

	return ( *ms_pFbxMgr );
}

inline MeshImporter& FbxMgr::GetMeshImporter()
{
	return m_meshImporter;
}

inline MeshImportType FbxMgr::GetMeshImportType() const
{
	return MIT_Fbx;
}

inline FbxManager* FbxMgr::GetFbxManager()
{
	return m_pFbxManager;
}

inline FbxScene* FbxMgr::GetFbxScene()
{
	return m_pFbxScene;
}

} // end of namespace Pipeline

#endif // end of #ifndef __MARS_PIPELINE_FBX_MGR_H__